﻿using System;
using System.Collections.Generic;
using System.Drawing;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using CaseReivew.Model;
using CaseReview.Model;
using CaseReview.SQLServerDAL;

public partial class admin_showResultDetails : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack) {
            string id = Request.QueryString["id"];
            CaseInfo caseInfo = BusinessLogic.GetInstance().GetCaseInfoByCaseId(id);
            Label66.Text = caseInfo.CaseId;
            Label67.Text = caseInfo.ReviewerName;
            Label68.Text = caseInfo.Title;
            Label69.Text = caseInfo.Age;
            Label72.Text = caseInfo.Labor;
            Label75.Text = caseInfo.Idle;
            Label70.Text = caseInfo.Owner;
            Label73.Text = caseInfo.Severity;
            Label76.Text = caseInfo.Phase;
            Label71.Text = caseInfo.ServicelLevel;
            Label74.Text = caseInfo.Type;
            Label77.Text = caseInfo.CountOfOwner;

            ReviewResultInfo result = BusinessLogic.GetInstance().GetReviewResultInfoByCaseId(id);
            lbl1.Text = result.Cac1;
            TextBox1.Text = result.Cac1C;
            if (result.Cac1.Equals("UnMeet"))
                lbl1.ForeColor = Color.Red;

            lbl2.Text = result.Cac2;
            TextBox2.Text = result.Cac2C;
            if (result.Cac2.Equals("UnMeet"))
                lbl2.ForeColor = Color.Red;

            lbl3.Text = result.Cac3;
            TextBox3.Text = result.Cac3C;
            if (result.Cac3.Equals("UnMeet"))
                lbl3.ForeColor = Color.Red;

            lbl80.Text = result.Cac4;
            TextBox19.Text = result.Cac4C;
            if (result.Cac4.Equals("UnMeet"))
                lbl80.ForeColor = Color.Red;

            lbl4.Text = result.Bac1;
            TextBox4.Text = result.Bac1C;
            if (result.Bac1.Equals("UnMeet"))
                lbl4.ForeColor = Color.Red;

            lbl5.Text = result.Bac2;
            TextBox5.Text = result.Bac2C;
            if (result.Bac2.Equals("UnMeet"))
                lbl5.ForeColor = Color.Red;

            lbl6.Text = result.Bac3;
            TextBox6.Text = result.Bac3C;
            if (result.Bac3.Equals("UnMeet"))
                lbl6.ForeColor = Color.Red;

            lbl7.Text = result.Nce1;
            TextBox7.Text = result.Nce1C;
            if (result.Nce1.Equals("UnMeet"))
                lbl7.ForeColor = Color.Red;

            lbl8.Text = result.Nce2;
            TextBox8.Text = result.Nce2C;
            if (result.Nce2.Equals("UnMeet"))
                lbl8.ForeColor = Color.Red;

            lbl9.Text = result.Nce3;
            TextBox9.Text = result.Nce3C;
            if (result.Nce3.Equals("UnMeet"))
                lbl9.ForeColor = Color.Red;

            lbl10.Text = result.Nce4;
            TextBox10.Text = result.Nce4C;
            if (result.Nce4.Equals("UnMeet"))
                lbl10.ForeColor = Color.Red;

            lbl11.Text = result.Nce5;
            TextBox11.Text = result.Nce5C;
            if (result.Nce5.Equals("UnMeet"))
                lbl11.ForeColor = Color.Red;

            lbl12.Text = result.Nce6;
            TextBox12.Text = result.Nce6C;
            if (result.Nce6.Equals("UnMeet"))
                lbl12.ForeColor = Color.Red;

            lbl13.Text = result.Nce7;
            TextBox13.Text = result.Nce7C;
            if (result.Nce7.Equals("UnMeet"))
                lbl13.ForeColor = Color.Red;

            lbl14.Text = result.Nce8;
            TextBox14.Text = result.Nce8C;
            if (result.Nce8.Equals("UnMeet"))
                lbl14.ForeColor = Color.Red;

            lbl15.Text = result.Nce9;
            TextBox15.Text = result.Nce9C;
            if (result.Nce9.Equals("UnMeet"))
                lbl15.ForeColor = Color.Red;

            lbl16.Text = result.Nce10;
            TextBox16.Text = result.Nce10C;
            if (result.Nce10.Equals("UnMeet"))
                lbl16.ForeColor = Color.Red;

            TextBox17.Text = result.Osum;
            TextBox18.Text = result.Osug;
        }
    }
}